import java.util.*;

public class Class3 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] arr = new int[n];
        for (int i=0;i<n;i++){
            arr[i] = i+1;
        }
        List<List<Integer>> lists = permute(arr);
        for (List<Integer> list:lists){
            boolean flag = true;
            for (int i=1;i<list.size();i++){
                if (i%2==1){
                    if (list.get(i)*list.get((i-1)/2)%2!=0){
                        flag =false;
                        break;
                    }
                }else {
                    if (list.get(i)*list.get((i-2)/2)%2!=0){
                        flag =false;
                        break;
                    }


                }
            }
            if (flag){
                for (int i=0;i<list.size()-1;i++){
                    System.out.print(list.get(i));
                    System.out.print(" ");
                }
                System.out.print(list.get(list.size()));
                return;
            }
        }


    }
    public static List<List<Integer>> permute(int[] nums){
        List<List<Integer>> res = new ArrayList<List<Integer>>();
        List<Integer> output = new ArrayList<Integer>();
        for (int num:nums)
        {
            output.add(num);
        }
        int n = nums.length;
        backtrack(n,output,res,0);
        return res;
    }

    public static void backtrack(int n,List<Integer> output,List<List<Integer>> res,int first){
        if (first==n){
            res.add(new ArrayList<Integer>(output));
        }
        for (int i=first;i<n;i++){
            Collections.swap(output,first,i);
            backtrack(n,output,res,first+1);
            Collections.swap(output,first,i);
        }
    }



}
